package com.guigu.qingcheng.servicegoods.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guigu.qingcheng.pojo.goods.TbStockBack;
import com.guigu.qingcheng.pojo.order.TbOrderItem;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author testjava
 * @since 2020-07-08
 */
public interface TbStockBackService extends IService<TbStockBack> {
    /**
     *分页查询待条件
     * @param searchMap
     * @param page
     * @param size
     * @return
     */
    Page<TbStockBack> findPage(Map<String, Object> searchMap, int page, int size);

    /**
     * 条件查询不分页
     * @param searchMap
     * @return
     */
    List<TbStockBack> findList(Map<String, Object> searchMap);

    /**
     * 事务回滚
     * @param orderItems
     */
    public void addList(List<TbOrderItem> orderItems);

    /**
     * 执行库存回滚
     */
    public void doBack();
}
